package com.toe.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.toe.pojo.dto.order.AddOrderCartDTO;
import com.toe.pojo.entity.order.OrderCart;
import com.toe.pojo.vo.order.OrderCartSimpleVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 陶涛
 * @since 2022-07-19
 */
public interface OrderCartService extends IService<OrderCart> {

    void addNewCart(AddOrderCartDTO orderCartDTO);

    List<OrderCartSimpleVO> deleteById(Long userId, Long cartId);

    List<OrderCartSimpleVO> countPlusOneById(Long userId, Long cartId);

//    OrderCartVO countMinusOneById(Long userId, Long cartId);

    void countMinusOneById(Long userId, Long cartId);

    List<OrderCartSimpleVO> updateCountById(Long userId, Long cartId, Integer newCount);

    List<OrderCartSimpleVO> updateSpecificationsById(Long userId, Long cartId, Long specificationsId);

    List<OrderCartSimpleVO> getOrderCartSimpleByUserId(Long userId);

    BigDecimal getTolPrice(Long[] cartIds);

}
